package com.eorchis.module.planopinion.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;
import com.eorchis.core.basedao.entity.IBaseEntity;
import com.eorchis.core.basedao.entity.impl.AbstractBaseEntity;
import com.eorchis.module.basedata.domain.BaseData;

/**
 * Title: PlanOpinion<br>
 * Description: 填写计划意见实体表实体对象<br>
 * Company: GoldGov<br>
 * Copyright @ 2012 GoldGov .All rights reserved.<br>
 * @author RongSL
 * @createDate 2016-07-12
 * @version $Revision$
 */
@Entity
@Table(name = "PLAN_OPINION")
public class PlanOpinion extends AbstractBaseEntity implements IBaseEntity {
	private static final long serialVersionUID = 1L;

	public static final Integer OPINION_STATE_YES=new Integer(1);//有意见
	public static final Integer OPINION_STATE_NO=new Integer(2);//无意见
	
	private String opinionId;//ID
	private BaseData opinionTitle;//意见标题
	private String opinionValue;//意见内容
	private String IssuedId;//下发表ID
	private Integer opinionState;//有无意见
	
	/**
	 * 获取ID
	 */	
	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	@Column(name="OPINION_ID")
	public String getOpinionId() {
		return opinionId;
	}
	/**
	 * 设置ID
	 */		
	public void setOpinionId(String opinionId) {
		this.opinionId = opinionId;
	}
	/**
	 * 获取意见标题
	 */	
	@ManyToOne(cascade = { javax.persistence.CascadeType.MERGE, javax.persistence.CascadeType.REFRESH }, fetch = FetchType.LAZY, optional = true)
	@JoinColumn(name = "Opinion_title", referencedColumnName = "DATA_CODE")
	public BaseData getOpinionTitle() {
		return opinionTitle;
	}
	/**
	 * 设置意见标题
	 */		
	public void setOpinionTitle(BaseData opinionTitle) {
		this.opinionTitle = opinionTitle;
	}
	/**
	 * 获取意见内容
	 */	
	@Column(name="OPINION_VALUE")
	public String getOpinionValue() {
		return opinionValue;
	}
	/**
	 * 设置意见内容
	 */		
	public void setOpinionValue(String opinionValue) {
		this.opinionValue = opinionValue;
	}
	
	@Column(name="Issued_Id")
	public String getIssuedId() {
		return IssuedId;
	}
	public void setIssuedId(String issuedId) {
		IssuedId = issuedId;
	}
	@Column(name="opinion_State")
	public Integer getOpinionState() {
		return opinionState;
	}
	public void setOpinionState(Integer opinionState) {
		this.opinionState = opinionState;
	}
}